<?PHP
include('../../include/functions.inc.php');
$selectedCycle = getParam("CYCLE");
$query = "SELECT A.ID,A.FK_COURSE,B.NAME,A.SECTION
           FROM cllg_teacher_assign A, cllg_courses_catalog B
            WHERE A.FK_TEACHER=" . sqlValue(getParam("ID"), "text") .
        " AND A.FK_COURSE=B.CODE AND A.FK_CYCLE=$selectedCycle AND A.STATUS=1";
$ls = $db->queryToArray($query);
?>
<select name="CURSO" id="CURSO">
    <OPTION VALUE="">-Seleccione-</option>
    <?php foreach ($ls as $c) { ?>
        <OPTION VALUE="<?php echo $c["ID"]; ?>">
            [<?php echo $c["FK_COURSE"]; ?>], 
            <?php echo $c["NAME"]; ?>, Seccion:<?php echo $c["SECTION"]; ?> </option>
    <?php } ?>
</select>
